home *** CD-ROM | disk | FTP | other *** search
- /**
- GRAB Graph Layout and Browser System
-
- Copyright (c) 1989, Tera Computer Company
- **/
-
- /* header for handling fonts */
-
- #ifndef fonthandler_h
- #define fonthandler_h
-
- #include <InterViews/font.h>
- #include <InterViews/Graphic/ppaint.h>
-
- static const numberfonts = 6;
- static const startfont = 4;
-
- class FontHandler
- {
- private:
- Font *FontArray[numberfonts];
- Font *psfont; // font for postscript output
- int EdgeLabelMapArray[numberfonts];
- // maps the current node font to the current edge font
- void set_fonts(int);
- public:
- FontHandler();
- void set_font(int, int);
- void force_nlabel();
- void noforce_nlabel();
- void force_elabel();
- void noforce_elabel();
- void SmallestFont(int*, int*);
- boolean FontWillFit(int, int);
- void SetPS(char*); // set the psfont
- int WidthPS(char*); // find the width of a string in the psfont
-
- Font* text_font; // font for text messages
- Font* node_font; // font for node labels
- Font* edge_font; // font for edge labels
- void newScreen();
- boolean text_flag; // will text fit in the nodes?
- boolean nlabel_forced; // if true, print node labels no matter what
- boolean elabel_forced; // if true, print edge labels
- };
-
- #endif
-